package com.alibaba.citrus.ots.sales.plan.api.salesplan;

import com.alibaba.citrus.ots.sales.plan.dto.api.request.OrganizationSelectRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.request.PageQuerySalePlanRequest;
import com.alibaba.citrus.ots.sales.plan.dto.api.request.QuerySalesPlanRequest;
import com.alibaba.citrus.ots.sales.plan.sdo.SalesPlanSDO;
import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.bcots.model.dto.OrganizationSDO;

import java.util.List;

/**
 * @author yuhailin
 * @description:
 * @date 2021-09-06 19:10
 */
@MeshFlowService(apps = {"bc_ots"}, name = "salesPlanQueryService")
public interface SalesPlanQueryService {

    /**
     * 分页查询月度计划
     * @param pageQuerySalePlanRequest
     * @return
     */
    Result<PageResult<List<SalesPlanSDO>>> pageQuerySalesPlanList(PageQuerySalePlanRequest pageQuerySalePlanRequest);

    /**
     * 根据id查询月度计划
     * @param querySalesPlanRequest
     * @return
     */
    Result<SalesPlanSDO> getSalesPlan(QuerySalesPlanRequest querySalesPlanRequest);

    /**
     * 根据条件获取最近月份的计划任务
     * @param querySalesPlanRequest
     * @return
     */
    Result<SalesPlanSDO> loadLatelySalesPlan(QuerySalesPlanRequest querySalesPlanRequest);

    /**
     * 获取当前登录的员工所属组织下拉
     * @param organizationSelectRequest
     * @return
     */
    Result<List<OrganizationSDO>> organizationSelect(OrganizationSelectRequest organizationSelectRequest);

    /**
     * 获取当月以后的计划(包含当月)
     * @param querySalesPlanRequest
     * @return
     */
    Result<List<SalesPlanSDO>> loadLatelySalesPlans(QuerySalesPlanRequest querySalesPlanRequest);
}
